<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
var findLUSlength = function(a, b) {
    if( a !== b ){
        return a.length>=b.length?a.length:b.length
    }else{
        return -1
    }
};

var a = "abc"
var b = "cdc"
console.log(findLUSlength(a, b))
    </script>
</body>
</html>